#ifndef __SCENE_OBJECT_H__
#define __SCENE_OBJECT_H__

#include "RenderObject.h"
#include <string>

#include "../include/IGameScene.h"
namespace fishingjoy
{
	namespace scene
	{
		class CSceneObject:public ISceneObject
		{
			CRenderObject m_RenderObj;
		public:
			std::string m_strName;
			CSceneObject(int tid):m_RenderObj(tid){}
		public:
			void update(float dt)
			{
				m_RenderObj.update(dt);
				//printf("update:scene object %s\n",m_strName.c_str());
			}
			CRenderObject* getRenderObject()
			{
				return &m_RenderObj;
			}

		public:
			virtual void setPosition(int x,int y)
			{
				m_RenderObj.setPositionX(x);
				m_RenderObj.setPositionY(y);
			}
			virtual void setDuration(int degree)
			{
				m_RenderObj.setRotation(degree);
			}

			virtual void setAnimation(const char* aniName)
			{
				m_RenderObj.setAni(aniName);
			}

			virtual float getWidth()
			{
				return m_RenderObj.getTextureRect().size.width;
			}

			virtual float getHeight()
			{
				return m_RenderObj.getTextureRect().size.height;
			}
		};
	}
}
#endif